package com.qingke.mybatis;

import org.apache.ibatis.session.SqlSession;

import com.qingke.mybatis.mapping.BlogMapper;
import com.qingke.pojo.Blog;

public class App3 {

	public static void main(String[] args) {
		
		SqlSession session = SessionManager.getInstance().getSession();
		BlogMapper mapper = session.getMapper(BlogMapper.class);
		
		Blog blog = new Blog();
		blog.setId(4);
		
		mapper.deleteBlog(blog);
		
		session.commit();
		session.close();
		
	}
	
}
